<template>
    <div>
      <ul class="mui-table-view">
        <li class="mui-table-view-cell mui-media" v-for="item in newsList" :key="item.id">
          <router-link :to="'/home/newsinfo/'+item.id">
            <img class="mui-media-object mui-pull-left" :src="item.logo">
            <div class="mui-media-body">
              {{ item.title }}
              <p class='mui-ellipsis'>
                <span>发表时间：2012-12-12 12:12:12</span>
                <span>点击:{{ item.num_job }}次</span>
              </p>
            </div>
          </router-link>
        </li>
      </ul>
    </div>
</template>
<style lang="scss" scoped>
.mui-table-view{
  li{
    height: 70px;
    h1{font-size: 14px;}
    .mui-ellipsis{
      font-size: 12px;
      color:#226aff;
      display: flex;
      justify-content: space-between
    }
  }
}
  
</style>
<script>
import {Toast} from 'mint-ui';
export default {
  data(){
    return {
      newsList:[]
    }
  },
  created() {
        this.getNewsList();
    },
  methods: {
    getNewsList(){//获取新闻列表
      this.$http.post('api/Flink/companyList').then(
        result=>{
          if(result.body.code!=200){
            Toast('获取新闻列表失败！')
          }else{
            this.newsList = result.body.data
          }          
        })
    }
  },
}
</script>